namespace catbm_winform
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.FormClosed += new FormClosedEventHandler(Form1_FormClosed); //这行代码的意思是：“当`FormClosed`事件发生时，我希望`Form1_FormClosed`方法被调用。”
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
         private void Form1_FormClosed(object sender, FormClosedEventArgs e) // 参数`sender`是触发事件的对象，参数`e`是事件的参数 参数类型与返回类型要与FormClosedEventHandler委托匹配
        {
            Application.Exit();
        }
    }
}